<title>优惠券管理</title>
<div class="row">
	<div class="col-xs-12">
		<div class="table-responsive">
			<table id="sample-table-1" class="table table-striped table-bordered table-hover">
				<thead>
					<tr>
						<th>ID</th>
						<th>用户id</th>
						<th>银行名称</th>
						<th>卡号</th>
						<th>提现金额</th>
						<th>可用余额</th>
						<th>创建时间</th>
						<th>修改时间</th>
						<th>处理状态</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
				<#list pager.itemList as u>
					<tr>
						<td><span class="gray center">${u.id!}</span></td>
						<td><span class="gray center">${u.userId!}</span></td>
						<td><span class="gray center">${u.bankName!}</span></td>
						<td><span class="gray center">${u.cardNo!}</span></td>
						<td><span class="gray center">-${u.money!}&nbsp;&yen;</span></td>
						<td><span class="gray center">${u.balance!}&nbsp;&yen;</span></td>
						<td>
							<#if u.createTime??>
								${tagUtils.formatDate(u.createTime)!}
							</#if>
						</td>
						<td>
							<#if u.modifyTime??>
								${tagUtils.formatDate(u.modifyTime)!}
							</#if>
						</td>
						<td>
							<#if u.status == 1>
								<span class="label label-sm label-warning arrowed">
									申请中	
								</span>
							<#elseif u.status==2>
								<span class="label label-sm label-warning arrowed">
									拒绝
								</span>
							<#else>
								<span class="label label-sm label-warning arrowed">
									同意	
								</span>
							</#if>
						</td>
						<td>
							<div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">
							<#if u.status == 1>
								<a class="green" onclick="isDel('${ctx}/admin/cash/apply?id=${u.id}&status=3')" alt="编辑">
									<i class="icon-edit bigger-100" >同意已打款</i>
								</a>
							</#if>
							<#if u.status == 1>
								<a class="red" onclick="isDel1('${ctx}/admin/cash/apply?id=${u.id}&status=2')" alt="Delete">
										<i class="icon-trash bigger-100">拒绝</i>
								</a>
							</#if>
							</div>
						</td>
					</tr>
				</#list>
				</tbody>
			</table>
		</div><!-- /.table-responsive -->
		<div class="hr hr-18 dotted hr-double"></div>
		<@h.page pager=pager action="${ctx}/admin/cash/list" />
		
	</div><!-- /span -->
	
</div><!-- /row -->

<#if errorMsg??>
	<div class="hr hr-18 hr-double dotted"></div>
	<h4 class="lighter">
		<i class="icon-hand-right icon-animated-hand-pointer red"></i>
		<span class="pink">${errorMsg}</span>
	</h4>
</#if>

<#if infoMsg??>
	<div class="hr hr-18 hr-double dotted"></div>
	<h4 class="lighter">
		<i class="icon-hand-right icon-animated-hand-pointer green"></i>
		<span class="pink">${infoMsg}</span>
	</h4>
</#if>
<script>
	$(document).ready(function(){
		RP.addBreadcrumb([{name:"提现管理"}, {name:"提现列表", active: true}]);
	});
	function isDel(url){
		if(!confirm("确认已打款？")){ 
				return false;		
		}else{
			location.href = url;
		}
	}
	function isDel1(url){
		if(!confirm("确认拒绝？")){ 
				return false;		
		}else{
			location.href = url;
		}
	}
</script>